#ifndef QQ_NAVIGATION_STYLE
#define QQ_NAVIGATION_STYLE

#include <qpainter.h>
#include <qpainterpath.h>
#include <qpropertyanimation.h>
#include <qstyleditemdelegate.h>
#include <qstyleoption.h>
#include <qlistview.h>

#include <ElaTheme.h>

#include "QQNavigationNode.h"

class QQNavigationDelegate : public QStyledItemDelegate
{
	Q_OBJECT
public:
	explicit QQNavigationDelegate(QObject* parent = nullptr);
	~QQNavigationDelegate();
	void setItemSize(QSize size);
	QSize getItemSize() const;
	void setPressIndex(const QModelIndex& index);
	QModelIndex getPressIndex() const;
protected:
	void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
	QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const override;
private:
	QSize mItemSize;
	qreal mIconMargin;
	QSize mKeyPointsSize;
	QModelIndex mPressIndex;
};

#endif // ELANAVIGATIONSTYLE_H
